// +FHDR------------------------------------------------------------
//                 Copyright (c) 2022 .
//                       ALL RIGHTS RESERVED
// -----------------------------------------------------------------
// Filename      : gjm_transaction.sv
// Author        : 
// Created On    : 2022-08-25 14:42
// Last Modified : 2023-12-01 14:39 by ICer
// -----------------------------------------------------------------
// Description:
//
//
// -FHDR------------------------------------------------------------

`ifndef __GJM_TRANSACTION_SV__
`define __GJM_TRANSACTION_SV__

class gjm_transaction extends uvm_sequence_item;

    /*GEN_AGENT POINT0*/
    rand int          cycle_post;
    realtime          mon_time;
    
    `uvm_object_utils_begin(gjm_transaction)
        /*GEN_AGENT POINT1*/
        `uvm_field_real(mon_time, UVM_ALL_ON|UVM_NOCOMPARE)
    `uvm_object_utils_end

    /*GEN_AGENT POINT2*/
    extern constraint cycle_post_cons;
    
    extern function new(string name = "gjm_transaction");
    extern virtual function gjm_transaction clone();
	extern virtual function void pack();
	extern virtual function void unpack();
	
endclass: gjm_transaction

/*GEN_AGENT POINT3*/
constraint gjm_transaction::cycle_post_cons{
    cycle_post dist {0:/30, [1:10]:/30, [10:20]:/30};
}

function gjm_transaction::new(string name = "gjm_transaction");
	super.new(name);
endfunction

function gjm_transaction gjm_transaction::clone();
    gjm_transaction to = new();
    /*GEN_AGENT POINT4*/
    return to;
endfunction: clone

function void gjm_transaction::pack();
endfunction: pack

function void gjm_transaction::unpack();
endfunction: unpack

`endif
